package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * 咨询师类型
 */
@Getter
public enum ConsultantTypeEnum {
    NOT_CONSULATE(0, "不是咨询师"),
    XL_CONSULATE(1, "心理咨询师");

    private int code;

    private String desc;

    ConsultantTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ConsultantTypeEnum getDscByType(Integer type) {
        for (ConsultantTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
